﻿
@{
    Layout = null;
}

<!DOCTYPE html>
<html>
<head>
    <title>基本信息-个人信息-【赛码网】</title>
    <meta charset="UTF-8">
    <meta name="description" content="赛码网-专注IT校招职位,最大最全的IT校招技术类职位网站;IT笔试面试加分利器,最新最全百度阿里腾讯京东奇虎360网易等一线互联网名企笔试真题题库">
    <meta name="keywords" content="赛码网,IT校招职位,C++笔试真题,JAVA笔试真题,PHP笔试真题,IT在线笔试,在线编程,笔试题库,笔试练习平台,ACM大神">
    <link rel="Shortcut Icon" href="/images/acm.ico">
    <link rel="stylesheet" type="text/css" href="~/Common/css/jquery.cxdialog.css" />
    <!-- <link rel="stylesheet" type="text/css" href="/css/all.css"/> -->
    <link rel="stylesheet" type="text/css" href="~/Common/css/all-exam.css" />
    <link href="~/Common/css/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="~/Common/css/comp/comp-info.css" />
    <link rel="stylesheet" type="text/css" href="~/Common/css/leftnav.css" />
    <style type="text/css">
        .photoBox {
            padding: 20px;
            padding-bottom: 0px;
        }

            .photoBox ul {
                overflow: hidden;
                margin-bottom: 20px;
            }

                .photoBox ul li {
                    float: left;
                    width: 20%;
                    text-align: center;
                    cursor: pointer;
                    position: relative;
                }

                    .photoBox ul li img {
                        width: 80%;
                        border: 1px solid white;
                    }

                        .photoBox ul li img:hover {
                            border: 1px solid #2abcb8;
                        }

                        .photoBox ul li img.defActive {
                            border: 1px solid #2abcb8;
                        }

                    .photoBox ul li em.activeEm {
                        background: url(~/Common/img/icon.png) -87px -60px no-repeat;
                        width: 18px;
                        height: 18px;
                        display: inline-block;
                        position: absolute;
                        right: 11px;
                        top: 0px;
                    }

        .info-rBox {
            padding-left: 76px;
        }
    </style>
</head>
<body>

    <!--head-->



    <!DOCTYPE html>
    <html>
    <body>
        <style>
                    /*.entlogo{
                height:50px;
            }*/
        </style>
        <script src="https://cdn.acmcoder.com/static/js/headerBtns.js" type="text/javascript"></script>

        <!--head-->

        <div class="head">
            <div class="head-bar public">
                <div class="logo">
                    <a target="_blank" href="http://www.acmcoder.com" s>


                        <img src="~/Common/img/logo.png" />


                    </a>
                    <p><span>考试中心</span></p>
                </div>
                <ul class="nav">
                    <!-- <li  class="active"><a href="/b/">考试首页</a></li>
                    <li><a href="../testSet/project_list.html">考试场次</a></li>
                    <li><a href="../cand/candidate_list.html">考生</a></li>
                    <li><a href="../monitor/monitor_list.html">监考</a></li>
                    <li><a href="../testReport/report_list.html">试卷报告</a></li>
                    <li><a href="../tiku/my_ques.html">我的题库</a></li> -->
                </ul>
                <div class="mguser">
                    <div class="mguser-box">
                        <input type="hidden" id="entAccountId" name="entAccountId" value="6096">
                        <input type="hidden" id="roleTypeHeader" name="roleTypeHeader" value="3">
                        <input type="hidden" id="examVersionHeader" name="examVersionHeader" value="1">
                        <input type="hidden" id="enterRight" name="enterRight" value="">
                        <a href="javascript:void(0)">
                            <p id="username1">郭少杰</p>&nbsp;&nbsp;
                            <i class="fa fa-angle-down"></i>

                            <table class="headlogotable">
                                <tr>
                                    <td>
                                        <img src="~/Common/img/peopleFive.png" data-src="~/Common/img/peopleFive.png" class="hgimg" />
                                    </td>
                                </tr>
                            </table>


                        </a>
                    </div>
                    <ul class="mguser-cnt">
                        <li>
                            <a href="/b/accountInfo">
                                <img src="~/Common/img/person.png" style="width: 14px;position: relative;left: -6px;top: -2px;"> &nbsp;个人信息
                            </a>
                        </li>
                        <li>
                            <a href="/b/entInfo">
                                <img src="~/Common/img/compnew.png" style="width: 14px;position: relative;left: -8px;top: -2px;"> &nbsp;公司信息
                            </a>
                        </li>
                        <li>
                            <a href="/b/compSet">
                                <img src="~/Common/img/testnew2.png" style="width: 14px;position: relative;left: -8px;top: -2px;"> &nbsp;考试信息
                            </a>
                        </li>
                        <!-- <li><a href="../userSet/userSet.html" id="userSet">
                        <img src="../../images/cog.png" style="width: 14px;position: relative;left: -8px;top: -2px;"> &nbsp;用户管理</a></li> -->
                        <li>
                            <img src="~/Common/img/exit.png" style="width: 14px;position: relative;left: -8px;top: -2px;"> &nbsp;退出登陆
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <!--head  end-->
        <!--Cnav-->
        <div class="cnav">
            <div class="public cnav_b">
                <div class="cnav_left">
                    考试五步曲
                </div>
                <div class="cnav_right">
                    <ul>
                        <li><span class="Cnav_t">1</span><b>新建试卷</b></li>
                        <li><span>2</span>添加试题</li>
                        <li><span>3</span>发起一场考试</li>
                        <li><span>4</span>导考生，发通知</li>
                        <li><span>5</span>查看报告</li>
                    </ul>
                </div>
            </div>
        </div>
        <script type="text/javascript">
            function LoginOut() {
                var path = '';
                if (path.indexOf('http:') > -1) {
                    path.replace("http://", "https://");
                }
                $.post(path + '/enterprise/dropOut', function (json) {
                    if (json.success) {
                        window.location.href = '/enterprise/login';
                    } else {
                        alert(json.msg);
                    }
                }, 'json');

            }


        </script>
        </div>

    </body>
</html><!--menu end-->
<!--content-->
<div class="acm-container">
    <div class="cnt-box public infoCnt-box contentBox ">
        <div class="info-cnt">
            <div class="navLeft">
                <dl>
                    <dt class="down">
                        <img src="~/Common/img/person.png" style="width: 14px;
    margin-right: 6px;margin-top: -5px;"> 个人信息 <i class="fa fa-minus icon-w"></i>
                    </dt>
                    <div class="list">
                        <a href="/b/accountInfo"><dd class="activeDd"><i></i>基本信息</dd></a>
                        <!--  <dd>绑定账号</dd> -->
                        <a href="/b/updatePwd"><dd><i></i>修改密码</dd></a>
                    </div>
                    <dt class="down">
                        <img src="~/Common/img/compnew.png" style="width: 14px;
    margin-right: 6px;margin-top: -5px;"> 公司信息 <i class="fa fa-minus icon-w"></i>
                    </dt>
                    <div class="list">
                        <a href="/b/entInfo"><dd><i></i>基本信息</dd></a>
                    </div>
                    <dt class="down">
                        <img src="~/Common/img/cog.png" style="width: 14px;
								margin-right: 6px;"> 账户信息 <i class="fa fa-minus icon-w"></i>
                    </dt>
                    <div class="list">
                        <a href="/b/order">
                            <dd><i></i>账户管理</dd>
                        </a>
                        <a href="/b/orderBill">
                            <dd><i></i>发票信息</dd>
                        </a>
                    </div>
                    <!-- <dd>绑定账号</dd>
                        <dd>修改密码</dd> -->
                    <!-- <dt>
                        <i class="fa fa-external-link icon-f"></i> 考试信息 <i class="fa fa-plus icon-w"></i>
                     </dt>
                     <dd>基本信息</dd> -->
                    <!-- <dd>绑定账号</dd>
                     <dd>修改密码</dd> -->
                </dl>
            </div>
            <!-- <ul>
                <li class="active"><a href="/b/accountInfo">基本信息</a></li>
                <li><a href="/b/updatePwd">修改密码</a></li>
            </ul> -->
            <div class="info-right newsRight">
                <div class="info-rBox" style="padding-bottom: 20px;">
                    <div class=" user_list clearfix">
                        <table class="info-table" border="0" cellspacing="0" cellpadding="0">
                            <tbody>
                                <tr>
                                    <td><label class="info-label" style="left: 30px;"><span></span>头像：</label></td>
                                    <td>
                                        <div class="clearfix" style="width: ; margin-bottom: 15px">
                                            <div class="clearfix" id="upPhoto">
                                                <img class="acphoto" src="~/Common/img/peopleFive.png" />
                                                <div class="mybtn">
                                                    <span>支持jpg、jpeg和png格式，最大2M</span><br>
                                                    <input type="button" id="up_photo" class="up_photo" value="上传头像" />
                                                    <input type="button" id="def_photo" class="up_photo" value="默认头像" style="background: #fff;color: #29bdb9;" />
                                                </div>

                                                <form id="fileForm" name="fileForm" action="/b/.action" method="post" enctype="multipart/form-data">
                                                    <table class="wwFormTable">
                                                        <input type="file" style="display: none;" id="f" name="fileInput" />
                                                    </table>
                                                </form>


                                                <input type="text" id="contactPhoto" name="contactPhoto" hidden class="cvcadd-text input" placeholder="请输入姓名/昵称" value='~/Common/img/peopleFive.png' />

                                            </div>

                                        </div>
                                    </td>
                                    <td></td>
                                </tr>
                                <tr>
                                    <td><label class="info-label" style="left: 30px;"><span>*</span>姓名：</label></td>
                                    <td>
                                        <div class="clearfix" style="width: ; margin-bottom: 15px">
                                            <div class="clearfix">
                                                <input type="text" name="contactName" class="cvcadd-text input" placeholder="请输入姓名/昵称" value='郭少杰' />
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr>
                                    <td><label class="info-label" style="left: 30px;"><span>*</span>邮箱：</label></td>
                                    <td>
                                        <div class="clearfix" style="width: ; margin-bottom: 15px">
                                            <div class="clearfix">
                                                <input type="text" name="contactEmail" class="cvcadd-text input" placeholder="请输入邮箱" value='995346154@qq.com'>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr>
                                    <td><label class="info-label" style="left: 30px;"><span>*</span>手机：</label></td>
                                    <td>
                                        <div class="clearfix" style="width: ; margin-bottom: 15px">
                                            <div class="clearfix">
                                                <input type="text" name="contactPhone" class="cvcadd-text input" placeholder="请输入手机" value="13673998714">
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td><label class="info-label" style="left: 3px;"><span></span>任职职位：</label></td>
                                    <td>
                                        <div class="clearfix" style="width: ; margin-bottom: 15px">
                                            <div class="clearfix">

                                                <input type="text" name="contactPosition" class="cvcadd-text input" placeholder="请输入您的任职职位" value="CEO">
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </tbody>
                        </table>



                    </div>
                    <!-- <p class="stip" style="color:#ff6600;"> &nbsp; </p> -->
                    <p class="saveBtn">
                        <a class="btn_ok" rel="cxdialog" rev="btn_ok" id="confirm_btn" style="position: relative;left: 103px;padding: 5px 60px;top: 10px;">保存</a>
                    </p>
                </div>
            </div>
            <div class="clear"></div>
        </div>
    </div>
    <!--content end-->
    <!--公司标签 弹窗-->
    <div id="signResume" class="none">
        <div class="signResume">
            <div class="signResume-box">
                <p>已选择亮点</p>
                <div class="signResume-tag">
                    <ul>
                        <li><a href="javascript:void(0)"><span>标记1</span><i></i></a></li>
                        <li><a href="javascript:void(0)"><span>标记1</span><i></i></a></li>
                    </ul>
                </div>

            </div>
            <ul class="signResume-ul">
                <li>带薪年假</li>
                <li>带薪年假</li>
                <li>带薪年假</li>
                <li>带薪年假</li>
                <li>带薪年假</li>
                <li>带薪年假</li>
                <li>带薪年假</li>
            </ul>
            <div class="comp_layerbox">
                <div class="signResume-add ">
                    <input type="text" class="signResume-text input" placeholder="自定义标记" />
                    <a href="javascript:void(0)" class="signResume-btn">添加</a>
                </div>
            </div>

            <div class="hide delResumeBox" id="loading">
                <div class="confimDialog">
                    <img alt="loading" src="view-source:https://kao.acmcoder.com/images/loading9.gif">
                </div>
                <div class="btns" style="text-align: center;">
                    文件正在上传中，请稍等……
                </div>
            </div>
        </div>
    </div>
</div>
<div class="photoBox">
    <ul>
        <li><img src="/images/defphoto/photoOne.png"><em></em></li>
        <li><img src="/images/defphoto/peopleThree.png"><em></em></li>
        <li><img src="/images/defphoto/peopleFive.png"><em></em></li>
        <li><img src="/images/defphoto/peopleSix.png"><em></em></li>
        <li><img src="/images/defphoto/photoTwo.png"><em></em></li>
    </ul>
    <div style="clear: both;"></div>
    <ul>

        <li><img src="/images/defphoto/peopleFour.png"><em></em></li>
        <li><img src="/images/defphoto/peopleSeven.png"><em></em></li>
        <li><img src="/images/defphoto/peopleEight.png"><em></em></li>
        <li><img src="/images/defphoto/peopleNine.png"><em></em></li>
        <li><img src="/images/defphoto/peopleTen.png"><em></em></li>
    </ul>
</div>
<!--公司标签 弹窗 end-->
<!--返回顶部-->
<!-- <a href="javascript:void(0)" class="sollTop"></a> -->
<!--返回顶部 end-->

<script src="~/Common/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="~/backstage/js/jquery.form.min.js" type="text/javascript" charset="utf-8"></script>
<script src="~/Common/js/all.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="https://cdn.acmcoder.com/static/1.0.1/js/jquery.cookie.js"></script>
<script src="~/Common/js/footer-exam.js" type="text/javascript" charset="utf-8"></script>
<script src="~/Common/js/comp/comp-info.js" type="text/javascript" charset="utf-8"></script>
<script src="~/backstage/js/jquery.form.min.js" type="text/javascript" charset="utf-8"></script>
<!-- 弹窗 -->
<script type="text/javascript" src="~/Common/js/lhgdialog/lhgdialog.min.js"></script>
<script type="text/javascript" src="~/Common/js/jquery.cxdialog.js"></script>
<script type="text/javascript">
			// 获取一个全局配置参数值(获取lhgDialog组件绝对路径)：
			var path = '';
			$(function(){
				var  $contactPhoto = $("input[name='contactPhoto']"),
						$contactName = $("input[name='contactName']"),
						$contactPhone = $("input[name='contactPhone']"),
						$contactEmail = $("input[name='contactEmail']"),
						$contactPosition = $("input[name='contactPosition']");
				$("#up_photo").click(function(){
					$("#f").click();
				});
				$("#confirm_btn").click(function(){
					var flag = true;
					if($.trim($contactName.val()) == ''){
						flag = false;
						$contactName.focus();
						alert("请输入姓名");
					}else if(getByteLen($.trim($contactName.val()))>10){
						flag = false;
						$contactName.focus();
						setErrMsg($contactName,"姓名过长，请输入10个字符以内的姓名");
					}else if($.trim($contactEmail.val()) == ''){
						flag = false;
						$contactPosition.focus();
						alert("请输入邮箱");
					}else if( !checkEmail( $.trim( $contactEmail.val() ) ) ){
						flag = false;
						setErrMsg($contactEmail,'邮箱格式不正确');
						$contactEmail.focus();
					}else if($.trim($contactPhone.val()) == ''){
						flag = false;
						$contactPhone.focus();
						alert("请输入手机");
					}else if( !checkTel( $.trim( $contactPhone.val() ) ) ){
						flag = false;
						setErrMsg($contactPhone, '手机格式不正确');
						$contactPhone.focus();
					}
					if(flag){
						$.post('/b/addEntInfoContact',{
							contactPhoto:$.trim($contactPhoto.val()),
							contactName : $.trim($contactName.val()),
							contactPhone : $.trim($contactPhone.val()),
							contactPosition : $.trim($contactPosition.val()),
							contactEmail : $.trim($contactEmail.val())
						},function(json){
							if(json.success){
								$(".hgimg").attr("src",$contactPhoto.val());

								$("#username1").html( $.trim($contactName.val()));

								$.ajax({url:'https://kaosys.acmcoder.com/api/changeUserInfo', xhrFields: {
									withCredentials: true}
								});

								alert("个人信息修改成功");
							}else{
								alert("个人信息修改失败");
							}
						},'json');
					}
				});

				$("#fileForm").ajaxForm({
					url : "/enterprise/uploadFile",
					type : "post",
					dataType : "json",
					async :true, // 异步
					success : function(json){
						$.cxDialog.close();
						if(json.success){
							$("#contactPhoto").val(json.msg);
							$(".acphoto").attr("src",json.msg);
							alert("上传成功！");
						}else{
							alert("上传头像失败！请重新上传");
						}

					},
					error : function(){
						alert("上传头像失败！请重新上传");
						$.cxDialog.close();
					}
				},'json');
				$("#f").on('change',function(){
					var f = document.getElementById("f").files;
					var array = (f[0].name).split('.');
					var filetype = array[array.length-1].toLowerCase();
					if(filetype == 'png' || filetype == 'jpg' ||
							filetype == 'jpeg'){
						if(f[0].size>2097152){
							alert("上传的文件的大小<=2M");
						}else{
							//先上传文件
							$.cxDialog({
								title: '上传文件',
								info: $("#loading"),
								lockScroll: true,
								closeBtn: false,
								background: '#000',
								width: 400

							});
							//先上传文件
							$("#fileForm").submit();//上传文件

						}

					}else{
						alert("上传的文件只支持jpg、jpeg、png格式图片");
					}

				});

				$('div input').keydown(function(){
					$(this).next('div').hide();
					$(this).parent('span').removeClass('regisit-error');
					$(this).siblings('span').remove();
				});
			});
			window.alert = function(mess){
				$.cxDialog({
					title: '提示',
					info: '<div style="padding:20px; min-width:300px; text-align:center;">'+mess+'</div>',
					lockScroll: true,
					background: '#000',
					okText: "确认",
					width:400,
					ok: function () {

					}
				});
			}
			function checkTel(value){
				var isPhone = /^([0-9]{3,4}-)?[0-9]{7,8}$/;
				var isMob=/^((\+?86)|(\(\+86\)))?(13[012356789][0-9]{8}|15[012356789][0-9]{8}|18[02356789][0-9]{8}|147[0-9]{8}|1349[0-9]{7})$/;
				if(isMob.test(value) || isPhone.test(value)){
					return true;
				}else{
					return false;
				}
			}
			var checkEmail = function(str){
				var re = /^(\w-*\.*)+(\w-?)+(\.\w{2,})+$/;
				if(re.test(str)){
					return true;
				}else{
					return false;
				}
			}
			var setErrMsg = function(_id, msg){
				if(_id.parent().find('span').length == 0)
					_id.parent().addClass('regisit-error').append('<span class="login-error "><i></i>' + msg + '</span>');
			}
			$('#def_photo').click(function(){
				 $.cxDialog({
				 	 title:'系统头像',
				 	 info:$('.photoBox'),
				 	 lockScroll: true,
					 closeBtn: true,
					 background: '#000',
				     width: 600,
				 	 okText:'确定',
				 	 ok:function(){
                        var src = $('.defActive').attr('src');
                        $('.acphoto').attr('src',src);
						$("#contactPhoto").val(src);
				 	 }

				 })
			})
			$(document).on('click','.photoBox ul li',function(){
				     $('.photoBox ul li img').removeClass('defActive');
				     $('.photoBox ul li em').removeClass('activeEm');
                     $(this).find('img').addClass('defActive');
                     $(this).find('em').addClass('activeEm')
			})
			/*姓名限制弹框*/
             $('input[name="contactName"]').blur(function(){
             	    var v= $.trim($(this).val());
             	    var thats= $(this)

             	    if(getByteLen(v)>10){
             	    	$(this).attr('disabled','disabled')
                          $.cxDialog({
							 	 title:'提示',
							 	 info:'<div style="padding-bottom:20px;padding-top:20px;text-align:center;">姓名最多只能输入10个字符</div>',
							 	 lockScroll: true,
								 closeBtn: true,
								 background: '#000',
							 	 okText:'我知道了',
							 	 ok:function(){
                                    $('input[name="contactName"]').val(v);
                                    thats.removeAttr('disabled')
							     }
                             })
             	    }
             });
			function getByteLen(val) {
				var len = 0;
				for (var i = 0; i < val.length; i++) {
					var a = val.charAt(i);
					if (a.match(/[^\x00-\xff]/ig) != null) {
						len += 2;
					}
					else {
						len += 1;
					}
				}
				return len;
			}

</script>
</body>
</html>

